package de.connecttext.model;

/**
 * ObjectRepresentation of the Vector of a Tag used by ConnectText. it contains
 * the Term itself but also additional informations regarding the terms'
 * appearance in the documents.
 * 
 * @author conrad
 * 
 */
public class TagVector implements Comparable<TagVector> {

	private String lemmatizedTerm;

	private String originalTerm;
	private long tf;
	private double tfidf;

	public String getLemmatizedTerm() {
		return lemmatizedTerm;
	}

	public void setLemmatizedTerm(String lemmatizedTerm) {
		this.lemmatizedTerm = lemmatizedTerm;
	}

	public String getOriginalTerm() {
		return originalTerm;
	}

	public void setOriginalTerm(String originalTerm) {
		this.originalTerm = originalTerm;
	}

	public long getTf() {
		return tf;
	}

	public void setTf(long tf) {
		this.tf = tf;
	}

	public double getTfidf() {
		return tfidf;
	}

	public void setTfidf(double tfidf) {
		this.tfidf = tfidf;
	}
	
	public String toString() {
		return "Lemma: " + lemmatizedTerm + " tf: " + tf + " tfidf: " + tfidf;
	}

	@Override
	public int compareTo(TagVector otherTagVector) {
		if (this.tfidf < otherTagVector.getTfidf())
			return -1;
		if (this.tfidf > otherTagVector.getTfidf())
			return 1;
		return 0;
	}

}
